<script src="jquery-1.7.min.js" > </script>
<script src="i18n.js" > </script>
<script src="common.js" > </script>
<script src="configure.js"> </script>
<script src="web.js"> </script>
<script src="configUpdate.js"> </script>
<script src="gas.js"> </script>
<script>
  var setting = loadLocalSetting();
  var updateSession = new UpdateSession();

  setting.cache.listener = updateSession;

  updateSession.bind('success', function() {
    setting.misc.lastUpdate = Date.now();
  });

  updateSession.bind('complete', function() {
    setting.update();
    console.log('Update completed');
  });

  UpdateSession.setUpdateInterval(function() {
    setting.updateConfig(updateSession);
  }, updateSession, DEFAULT_INTERVAL);

  startListener();
  registerRequestListener();

  initGAS();
  if (firstRun || firstUpgrade) {
    firstRun = false;
    open('options.html');
  }
</script>
